home *** CD-ROM | disk | FTP | other *** search
- Here is a sorcecode for a sample DPMS blanker using ECS/AGA chipset :
-
- Written for SAS_C 6.5 using outoinitialization of the system libraries.
-
-
- Comments are wellcomed (tell me if it work well with your monitor, config)
-
- It work well with my Hyunda∩ 15" monitor. The DPSM level 2 makes a little
- noise in my monitor. Level 1 and 3 works quietely. I have an A4000.
-
-
- /***************************************************************************
- * DPMS.c (Sample code for DPMS blanking with ECS/AGA chipset. *
- * Leu Simon GRIS (7.1.96) Use it at your own risks (I take no *
- * responsability for the use of the code below. This code is freeware *
- * and released to the public domain. *
- ***************************************************************************
- */
-
- #define __USE_SYSBASE 1
-
- #include <exec/types.h>
- #include <proto/exec.h>
-
- #include <proto/intuition.h>
-
- #include <proto/graphics.h>
-
- #include <dos/dos.h>
- #include <proto/dos.h>
-
- #include <hardware/custom.h>
-
- extern struct IntuitionBase *IntuitionBase;
- extern struct GfxBase *GfxBase;
- extern struct DosLibrary *DOSBase;
-
- LONG main(VOID);
-
- extern struct Custom __far custom;
-
- LONG main(VOID)
- {
- /* Get the addres of the current view */
- struct View *view = ViewAddress();
-
- /* Reset the chipset registers. */
- LoadView(NULL);
-
- /* Enable variable synchronization */
- custom.beamcon0 = VARVSYNC | VARHSYNC;
-
- /* Perform DPMS level 1 */
- custom.hsstrt = 0x0;
- custom.hsstop = 0x0;
-
- custom.vsstrt = VGA_VSSTRT;
- custom.vsstop = VGA_VSSTOP;
-
- Delay(50*10); /* Spend some time in DPMS1 state */
-
- DisplayBeep(NULL); /* Signal the user of next DPMS state */
-
- /* Perform DPMS level 2 */
- custom.hsstrt = VGA_HSSTRT;
- custom.hsstop = VGA_HSSTOP;
-
- custom.vsstrt = 0x0;
- custom.vsstop = 0x0;
-
- Delay(50*10); /* Spend some time in DPMS2 state */
-
- DisplayBeep(NULL); /* Signal the user of next DPMS state */
-
- /* Perform DPMS level 3 lowest consumption) */
- custom.hsstrt = 0x0;
- custom.hsstop = 0x0;
-
- custom.vsstrt = 0x0;
- custom.vsstop = 0x0;
-
- Delay(50*10); /* Spend some time in DPMS3 state */
-
- LoadView(view); /* Restore the displayed screen */
-
- DisplayBeep(NULL); /* Signal the user the last DPMS state has ended. */
-
- return( RETURN_OK );
- }
-
-
-
- Simon Gris FIDO 2:320/104.39 EMAIL: Simon.Gris@ramses.telesys-innov.fr
- Simon.Gris@ramses.fdn.org
-
-